package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.LeaderApproval;
import com.lh.entity.table.LearnInfo;
import com.lh.service.LeaderApprovalService;
import com.lh.utils.Answer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/leaderApproval")
public class LeaderApprovalController {

    @Autowired
    private LeaderApprovalService leaderApprovalService;

    @RequestMapping("/getApprovedName")
    public Answer<Object> getApprovedName() {
        return leaderApprovalService.getApprovedName();
    }

    @RequestMapping("/addLeaderApproval")
    public Answer<Object> addLeaderApproval(@RequestBody LeaderApproval leaderApproval) {
        return leaderApprovalService.addLeaderApproval(leaderApproval);
    }

    @RequestMapping("/readApproval")
    public Answer<Object> readApproval(@RequestBody LeaderApproval leaderApproval) {
        return leaderApprovalService.readApproval(leaderApproval);
    }

    @RequestMapping("/queryApprovalPage")
    public Answer<Object> queryApprovalPage(@RequestBody JSONObject jsonObject) {
        return leaderApprovalService.queryApprovalPage(jsonObject);
    }



}
